{% extends "base.html" %}

{% load url from future %}
{% load i18n %}
{% load bootstrap_tags %}

{% block head_title %}{% trans "Sign up" %}{% endblock %}
{% block header %}
<div class="jumbotron subhead" id="overview">
	<div class="container">
		<h1>Sign up</h1>
	</div>
</div>
{% endblock %}

{% block content %}
    <div class="row">
        <div class="offset2 span8">
            <form id="signup_form" method="post" action="{% url "account_signup" %}" autocapitalize="off" class="form-horizontal"{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
                <legend>{% trans "Create a new account" %}</legend>
                <fieldset>
                    {% csrf_token %}
                    {{ form|as_bootstrap }}
                    {% if redirect_field_value %}
                        <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
                    {% endif %}
                    <div class="form-actions">
                        <button id="submit" type="submit" class="btn btn-primary">{% trans "Sign up" %}</button>
                    </div>
                </fieldset>
            </form>

			{% include "account/signup_footer.html" %}
        </div>
    </div>
{% endblock %}


{% block scripts %}{{ block.super }}
<script type="text/javascript">
$(function() {
	$('input').filter(function() { return $(this).val() === ''; }).first().focus();
	$('#submit').on('click', function() {
		window.show_modal_loading("Logging in...", 500);
		return true;
	});
});
</script>
{% endblock %}
